#include <iostream>

using namespace std;

//常见的函数样式有4种
//1.无参无返
void test1() {
    cout << "this is test1" << endl;
}

//2.有参无返
void test2(int a) {
    cout << "this is test2" << endl;
    cout << "a=" << a << endl;
}

//3.无参有返
int test3() {
    cout << "this is test3" << endl;
    return 10;
}

//4.有参有返
int test4(int a) {
    cout << "this is test4" << endl;
    return a;
}

int main() {
    //1.无参无返函数调用
    test1();
    //2.有参无返函数调用
    test2(100);
    //3.无参有返函数调用
    int num1 = test3();
    cout << "num1=" << num1 << endl;
    //4.有参有返函数调用
    int num2 = test4(100);
    cout << "num2=" << num2 << endl;
    return 0;
}

